package shili;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

public class BQ {
    public static void main(String[] args) throws InterruptedException {
        BlockingQueue<String> queue1 = new ArrayBlockingQueue<>(3);
            queue1.put("111");
        System.out.println("put成功");
            queue1.put("111");
        System.out.println("put成功");
        queue1.take();
        System.out.println("take成功");
        queue1.take();
        System.out.println("take成功");
        queue1.take();
        System.out.println("take成功");
    }
}
